// pages/index/caloli_list/caloli_list.js
const app = getApp()
Page({
data: {
    eatList: [{
      icon: '../../images/milk.png',
      name: '牛奶',
      sum:'135千卡',
    },
      {
      icon: '../../images/corn.png',
        name: '玉米',
        sum: '140千卡',
    },
      {
        icon: '../../images/shiguo.png',
        name: '石锅拌饭',
        sum: '231千卡',
      },
      {
        icon: '../../images/zhou.png',
        name: '八宝粥',
        sum: '285千卡',
      },
      {
        icon: '../../images/tomato_egg.png',
        name: '番茄炒蛋',
        sum: '150千卡',
      },
      {
        icon: '../../images/chaowosun.png',
        name: '炒莴笋',
        sum: '100千卡',
      },
      {
        icon: '../../images/baozi.png',
        name: '韭菜包子',
        sum: '170千卡',
      }
    ],


    bindText: function (e) {
      var t_text = e.detail.value.length;
      // console.log(t_text)
      this.setData({
        t_length: t_text
      })
    },
  upconfirm: function() {
    this.up();
  },
  up: function() {
    var that = this;
    data = {
      openid: app.openid,
      program_id: app.program_id,
      only_num: only_num
    }
    wx.uploadFile({
      url: 'pg.php / Aishen / upload_photo',
      filePath: that.data.img_arr[i],
      name: 'image',//文件对应的参数名字（key)
      formData: data,//其他的表单信息
      success: function (res) {
 },
    });
  }
}
})